#!/usr/bin/env node

const rd = require('rd');

const fs = require("fs");
const process = require('child_process');


fs.readdirSync('F:\\dev\\gaiay\\all');


// 同步列出目录下的所有文件
let files = rd.readSync('F:\\dev\\gaiay\\all');
for (let f of files) {

    let stat = fs.statSync(f);

    if (f.match(/resources/) && stat.isFile()) {
        let f2 = f.replace("F:\\dev\\gaiay\\all", "F:\\config").replace("resources", "resources\\config\\config").replace("config\\prod", "config\\pro");
        try {



            fs.copyFileSync(f2, f);
            console.log("成功")
        } catch (e) {
            ///console.log(f + "  " + f2)
        }


        // F:\config\bang\zm-bang-service\src\main\resources\config\config
    }
}